#ifndef HAPR_ASSMT_LINEFOLLOW_H
#include <stdint.h>

typedef struct {
  uint8_t FollowSpeed;
  uint8_t P_Factor;     //Perceived displacement from line
  uint8_t P_Quotient;    
  uint8_t D_Factor;     //Rate of correction
  uint8_t D_Quotient; 
} LineFollowCfg;


typedef enum { RAW = 0, CALIBRATED } calib_status;

typedef struct {
  calib_status status;
  uint16_t PC0;
  uint16_t PC1;
  uint16_t PC2;
  uint16_t PC3;
  uint16_t PC4;
} SensorVals;

void LINE_SerialInit(void);
void LINE_ResetCalibration(void);
void LINE_AutoCalibrate(void);
void LINE_GetSensors(SensorVals *);

void LINE_StartFollow(LineFollowCfg *);
void LINE_EndFollow(uint8_t);

#endif //HAPR_ASSMT_LINEFOLLOW_H
